package com.zwl.module_home

import com.zwl.lib_base.base.BaseRepository
import com.zwl.lib_base.base.HomeApiService
import javax.inject.Inject

class MainRepository @Inject constructor(/*application: Application*/) : BaseRepository() {
    @Inject
    lateinit var mApi: HomeApiService

    //请求密码:emit将数据发射到catch或者collect上面
    suspend fun getPwd() = request<String> {
        var map = HashMap<String, String>()
        map.put("xxx", "xxx")
        mApi.getPwd(map).run {
            it.emit(this)
        }
    }
}